package cn.tedu.property.management.mapper;

import cn.tedu.property.management.pojo.entity.Owner;
import cn.tedu.property.management.pojo.vo.OwnerListVO;
import cn.tedu.property.management.pojo.vo.OwnerStandardVO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OwnerMapper {
    int addNewOwner(Owner owner);
    int deleteById(Long id);
    int updateById(Owner owner);

    /**
     * 根据业主姓名查询业主信息
     * @param name 业主姓名
     * @return 业主信息
     */
    OwnerStandardVO getOwnerByName(String name);

    /**
     *  根据房号查询业主信息
     * @param roomNumber 房间号
     * @return 业主信息
     */
    OwnerStandardVO getOwnerByRoomNumber(String roomNumber);

    /**
     *  根据业主手机号查询业主信息
     * @param phone 业主手机号码
     * @return 业主信息
     */
    OwnerStandardVO getOwnerByPhone(String phone);

    /**
     *  根据id查询业主信息
     * @param id 业主id
     * @return 业主信息
     */
    OwnerStandardVO getOwnerById(Long id);


    List<OwnerListVO> getAllOwner();
}
